\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder}{\section{strange.\-extensions.\-command.\-impl.\-Command\-Binder Class Reference}
\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder}\index{strange.\-extensions.\-command.\-impl.\-Command\-Binder@{strange.\-extensions.\-command.\-impl.\-Command\-Binder}}
}


A Binder that triggers the instantiation of Commands.  


Inheritance diagram for strange.\-extensions.\-command.\-impl.\-Command\-Binder\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.052786cm]{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a44d4f67e036ad79c90f95143e2972299}{override \hyperlink{interfacestrange_1_1framework_1_1api_1_1_i_binding}{I\-Binding} \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a44d4f67e036ad79c90f95143e2972299}{Get\-Raw\-Binding} ()}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a44d4f67e036ad79c90f95143e2972299}

\begin{DoxyCompactList}\small\item\em Generate an unpopulated I\-Binding in whatever concrete form the Binder dictates. \end{DoxyCompactList}\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a446f1cd5636b830764050fc472c38b51}{virtual void \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a446f1cd5636b830764050fc472c38b51}{React\-To} (object trigger)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a446f1cd5636b830764050fc472c38b51}

\begin{DoxyCompactList}\small\item\em Trigger a key that unlocks one or more Commands. \end{DoxyCompactList}\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a40b47054aba067ba839f3927ea2aeff9}{virtual void \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a40b47054aba067ba839f3927ea2aeff9}{React\-To} (object trigger, object data)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a40b47054aba067ba839f3927ea2aeff9}

\begin{DoxyCompactList}\small\item\em Trigger a key that unlocks one or more Commands and provide a data injection to that \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command}{Command}. \end{DoxyCompactList}\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a3e7ec542cbdfec1a78ce0583451b1565}{virtual void \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a3e7ec542cbdfec1a78ce0583451b1565}{Stop} (object key)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a3e7ec542cbdfec1a78ce0583451b1565}

\begin{DoxyCompactList}\small\item\em Called to halt execution of a currently running command group. \end{DoxyCompactList}\item 
virtual void \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a09d4317fb2d40a84fe7979ed7296c803}{Release\-Command} (\hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command}{I\-Command} command)
\begin{DoxyCompactList}\small\item\em Release a previously retained \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command}{Command}. \end{DoxyCompactList}\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a3a548ce87ab1beb018fea94f52f065ad}{\hyperlink{classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool}{Pool}$<$ T $>$ \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a3a548ce87ab1beb018fea94f52f065ad}{Get\-Pool$<$ T $>$} ()}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a3a548ce87ab1beb018fea94f52f065ad}

\begin{DoxyCompactList}\small\item\em Retrieve the Pool of the specified type. \end{DoxyCompactList}\item 
bool \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_ad36f925e5e11f3407531b66c27d78d14}{Trigger$<$ T $>$} (object data)
\begin{DoxyCompactList}\small\item\em Cause this I\-Triggerable to access any provided Key in its Binder by the provided generic and data. \end{DoxyCompactList}\item 
bool \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a89b307b59946a314b5eaf6cbe4a83dc2}{Trigger} (object key, object data)
\begin{DoxyCompactList}\small\item\em Cause this I\-Triggerable to access any provided Key in its Binder by the provided key and data. \end{DoxyCompactList}\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a2ebf06f8c2b143f7af5475c851173808}{new virtual \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command_binding}{I\-Command\-Binding} \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a2ebf06f8c2b143f7af5475c851173808}{Bind$<$ T $>$} ()}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a2ebf06f8c2b143f7af5475c851173808}

\begin{DoxyCompactList}\small\item\em Bind a trigger Key by generic Type. \end{DoxyCompactList}\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a63849fed5502d91b346caab1e0fe9a43}{new virtual \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command_binding}{I\-Command\-Binding} \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a63849fed5502d91b346caab1e0fe9a43}{Bind} (object value)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a63849fed5502d91b346caab1e0fe9a43}

\begin{DoxyCompactList}\small\item\em Bind a trigger Key by value. \end{DoxyCompactList}\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_aebfd6c091951d7b13731b4d83665ee47}{new virtual \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command_binding}{I\-Command\-Binding} \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_aebfd6c091951d7b13731b4d83665ee47}{Get\-Binding$<$ T $>$} ()}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_aebfd6c091951d7b13731b4d83665ee47}

\begin{DoxyCompactList}\small\item\em Retrieve a binding based on the provided Type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a31efd303e2d431a7aa6654c8598a2ae1}{void {\bfseries next} (\hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command_binding}{I\-Command\-Binding} binding, object data, int depth)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a31efd303e2d431a7aa6654c8598a2ae1}

\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a9037b836c71a9332fe7eb2e0fcb748e4}{virtual void {\bfseries dispose\-Of\-Sequenced\-Data} (object data)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a9037b836c71a9332fe7eb2e0fcb748e4}

\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a6ac0eaf086a6425a54492846f858703d}{virtual \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command}{I\-Command} {\bfseries invoke\-Command} (Type cmd, \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command_binding}{I\-Command\-Binding} binding, object data, int depth)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a6ac0eaf086a6425a54492846f858703d}

\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_afcde1b363255b70ed9f84c7f90d139d4}{virtual \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command}{I\-Command} {\bfseries create\-Command} (object cmd, object data)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_afcde1b363255b70ed9f84c7f90d139d4}

\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a2900c118bf394b4b6138832e010c1df6}{\hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command}{I\-Command} {\bfseries get\-Command} (Type type)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a2900c118bf394b4b6138832e010c1df6}

\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_ac72e98df4d7b5c47d4f6514fd515f4ec}{void {\bfseries track\-Command} (\hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command}{I\-Command} command, \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command_binding}{I\-Command\-Binding} binding)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_ac72e98df4d7b5c47d4f6514fd515f4ec}

\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a31a0b6d3b5de1d9a8029ab8461fd46ee}{void {\bfseries execute\-Command} (\hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command}{I\-Command} command)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a31a0b6d3b5de1d9a8029ab8461fd46ee}

\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a4ebf044dad407ce0757b2118d7373a80}{override void \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a4ebf044dad407ce0757b2118d7373a80}{resolver} (\hyperlink{interfacestrange_1_1framework_1_1api_1_1_i_binding}{I\-Binding} binding)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a4ebf044dad407ce0757b2118d7373a80}

\begin{DoxyCompactList}\small\item\em The default handler for resolving bindings during chained commands. \end{DoxyCompactList}\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a54a7f7e25b5b9dbebd9f61c484a5f289}{virtual \hyperlink{classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool}{Pool} {\bfseries make\-Pool\-From\-Type} (Type type)}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a54a7f7e25b5b9dbebd9f61c484a5f289}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_ab3bddee94cadd3048189e1e5cd59ead9}{Dictionary$<$ Type, \hyperlink{classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool}{Pool} $>$ {\bfseries pools} = new Dictionary$<$Type, \hyperlink{classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool}{Pool}$>$ ()}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_ab3bddee94cadd3048189e1e5cd59ead9}

\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a8b6b770089f105b017000c9957aa7125}{Hash\-Set$<$ \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command}{I\-Command} $>$ \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a8b6b770089f105b017000c9957aa7125}{active\-Commands} = new Hash\-Set$<$\hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command}{I\-Command}$>$()}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a8b6b770089f105b017000c9957aa7125}

\begin{DoxyCompactList}\small\item\em Tracker for parallel commands in progress. \end{DoxyCompactList}\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_ada066db5cf3c3014735a7874260ed4b1}{Dictionary$<$ \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command}{I\-Command}, \\*
\hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command_binding}{I\-Command\-Binding} $>$ \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_ada066db5cf3c3014735a7874260ed4b1}{active\-Sequences} = new Dictionary$<$\hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command}{I\-Command}, \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command_binding}{I\-Command\-Binding}$>$ ()}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_ada066db5cf3c3014735a7874260ed4b1}

\begin{DoxyCompactList}\small\item\em Tracker for sequences in progress. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Properties}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a011d8c52fdd8fdfffbc3d61089d3ff19}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder}{I\-Injection\-Binder} {\bfseries injection\-Binder}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a011d8c52fdd8fdfffbc3d61089d3ff19}

\item 
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a1093c0bcae55cef2bb0f211714d070c5}{bool {\bfseries use\-Pooling}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a1093c0bcae55cef2bb0f211714d070c5}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
A Binder that triggers the instantiation of Commands. 

Commands are where the logic of your application belongs. These Commands typically focus on a single function, such as adding a View, requesting a service, reading from or saving to a model.

The act of binding events to Commands means that code needn't know anything about an event recipient, or even how the event will be used. For example, a Mediator might send out an event that two View objects collided. A \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command}{Command} would then determine that the result of that event was to Destroy both objects, tell a Score\-Keeper model to change the score and request a message be sent to the server. Whether that example means one \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command}{Command} or three is up to your coding preference... \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder}{Command\-Binder} can trigger one \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command}{Command} or multiple Commands off the same event.

Note that \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder}{Command\-Binder} also features sequencing. By default, \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder}{Command\-Binder} fires all Commands in parallel. If your binding specifies {\ttfamily In\-Sequence()}, commands will run serially, with the option of suspending the chain at any time.

Example bindings\-: \begin{DoxyVerb}Bind("someEvent").To<SomeCommand>(); //Works, but poor form to use strings. Use the next example instead

Bind(EventMap.SOME_EVENT).To<SomeCommand>(); //Make it a constant

Bind(ContextEvent.START).To<StartCommand>().Once(); //Destroy the binding immediately after a single use

Bind(EventMap.END_GAME_EVENT).To<FirstCommand>().To<SecondCommand>().To<ThirdGCommand>().InSequence();
\end{DoxyVerb}


See \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command}{Command} for details on asynchronous Commands and cancelling sequences. 

\subsection{Member Function Documentation}
\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a09d4317fb2d40a84fe7979ed7296c803}{\index{strange\-::extensions\-::command\-::impl\-::\-Command\-Binder@{strange\-::extensions\-::command\-::impl\-::\-Command\-Binder}!Release\-Command@{Release\-Command}}
\index{Release\-Command@{Release\-Command}!strange::extensions::command::impl::CommandBinder@{strange\-::extensions\-::command\-::impl\-::\-Command\-Binder}}
\subsubsection[{Release\-Command}]{\setlength{\rightskip}{0pt plus 5cm}virtual void strange.\-extensions.\-command.\-impl.\-Command\-Binder.\-Release\-Command (
\begin{DoxyParamCaption}
\item[{{\bf I\-Command}}]{command}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a09d4317fb2d40a84fe7979ed7296c803}


Release a previously retained \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command}{Command}. 

By default, a \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command}{Command} is garbage collected at the end of its {\ttfamily Execute()} method. But the \hyperlink{classstrange_1_1extensions_1_1command_1_1impl_1_1_command}{Command} can be retained for asynchronous calls. 

Implements \hyperlink{interfacestrange_1_1extensions_1_1command_1_1api_1_1_i_command_binder_ae063357e7694fe0e107a53cc77e8e112}{strange.\-extensions.\-command.\-api.\-I\-Command\-Binder}.

\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a89b307b59946a314b5eaf6cbe4a83dc2}{\index{strange\-::extensions\-::command\-::impl\-::\-Command\-Binder@{strange\-::extensions\-::command\-::impl\-::\-Command\-Binder}!Trigger@{Trigger}}
\index{Trigger@{Trigger}!strange::extensions::command::impl::CommandBinder@{strange\-::extensions\-::command\-::impl\-::\-Command\-Binder}}
\subsubsection[{Trigger}]{\setlength{\rightskip}{0pt plus 5cm}bool strange.\-extensions.\-command.\-impl.\-Command\-Binder.\-Trigger (
\begin{DoxyParamCaption}
\item[{object}]{key, }
\item[{object}]{data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_a89b307b59946a314b5eaf6cbe4a83dc2}


Cause this I\-Triggerable to access any provided Key in its Binder by the provided key and data. 

\begin{DoxyReturn}{Returns}
false if the originator should abort dispatch
\end{DoxyReturn}


Implements \hyperlink{interfacestrange_1_1extensions_1_1dispatcher_1_1api_1_1_i_triggerable_a07af18f0259e869bd981b81edb58c28f}{strange.\-extensions.\-dispatcher.\-api.\-I\-Triggerable}.

\hypertarget{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_ad36f925e5e11f3407531b66c27d78d14}{\index{strange\-::extensions\-::command\-::impl\-::\-Command\-Binder@{strange\-::extensions\-::command\-::impl\-::\-Command\-Binder}!Trigger$<$ T $>$@{Trigger$<$ T $>$}}
\index{Trigger$<$ T $>$@{Trigger$<$ T $>$}!strange::extensions::command::impl::CommandBinder@{strange\-::extensions\-::command\-::impl\-::\-Command\-Binder}}
\subsubsection[{Trigger$<$ T $>$}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf strange.\-extensions.\-command.\-impl.\-Command\-Binder.\-Trigger}$<$ T $>$ (
\begin{DoxyParamCaption}
\item[{object}]{data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classstrange_1_1extensions_1_1command_1_1impl_1_1_command_binder_ad36f925e5e11f3407531b66c27d78d14}


Cause this I\-Triggerable to access any provided Key in its Binder by the provided generic and data. 

\begin{DoxyReturn}{Returns}
false if the originator should abort dispatch
\end{DoxyReturn}


Implements \hyperlink{interfacestrange_1_1extensions_1_1dispatcher_1_1api_1_1_i_triggerable_ab51a637635cbd1819f5d33f00831c8d5}{strange.\-extensions.\-dispatcher.\-api.\-I\-Triggerable}.



The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Strange\-Io\-C/scripts/strange/extensions/command/impl/Command\-Binder.\-cs\end{DoxyCompactItemize}
